package demo1;

public class Test06 {
    private String name;
    public void setName(String name){
        if(name.equals("小明")){
            System.out.println("正确");
        }else{
            this.name=name;
        }
    }
    public String getName(){
        return name;
    }
}
